Added non-multiprocessing option to play nice with wsgi (this needs revisited)
Fixed env.close in wrong section and added sectional error handling
Added seperted testing tmp location to avoid permission errors