Remove the extension from the string path to file