This was tested on the 2.7.1 standalone. A quick repo is to pass in -Dpython.cachedir=this_doesnt_exist to java when initializing the jython standalone (and maybe export TMPDIR=this_doesnt_exist when not using the standalone). Then try:
from os import kill
from os import getpid
Notice that you'll get ImportErrors saying they do not exist.
After this, create the directory "this_doesnt_exist" and notice that those modules can be loaded just fine.