Make sure repo paths do not contain leading or trailing slashes

Resolves issue #11 but I am not sure whether this is the best way to solve this problem.