Pkg.clone: allow leading [^\/] for auto package name detection.

Closes #6141 and #6152.