Fixed assumption that the temporary directory is located in /tmp