Tweak temporary directory methods to support subdirectories
App Engine fixes