Fix regex for temporary file check