Optimize for cases where path contains no glob characters