Fix for opam trunk

Version.pinned is no longer defined
Fixed lookup for ~/.opam
Merge pull request #3 from AltGr/fix-opam-pinned

Fix for opam trunk