Strip slashes from end of path. Fixes #85

Nix doesn't accept paths that end with a slash, so we need to remove the
slashes.
Check if path contains slashes after stripping

If we do `cabal2nix test/`, we need to add a `./` prefix because the
path doesn't contain any slashes after stripping.
Merge pull request #87 from bennofs/path-strip-slashes

Strip slashes from end of path. Fixes #85