Removed regex escaping test, fixed path check