Fixed a bug (had forgot to remove the trailing slashes on directory names)