Bug 727551 - remove trailing slash from directories