Fixed a bug with paths that end in a slash