Fixed a bug when paths have trailing slashes.