CB-6571 Fix getParentForLocalURL to work correctly with directories with trailing '/' (This closes #58)

Fixes 2 failing unit tests in mobile spec.