[Fix] Invalid file extension was retreived for files with no extension when ".." occured in path

+ Passing only filename instead of absolute path. If no '.' char is found, returned ext is an empty string