Cleaned up regex's in the checkForValidFilename method.