Fix race conditions in test setup
Allow to specify alternate temp paths for nginx