.functions: Tweak `targz`

Trim the trailing slash from the path argument passed to `targz`.

This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`.

Ref. #202.