Unable to create tempfile - check file handle limits?