Removing trailing slash of monitored and patched dirs.