Modify script for mounting and unmounting temp directory