Modifications to accept pkgname, fixes #11

//cc @hughsk