make bpkg friendly

See [bpkg](https://github.com/bpkg/bpkg) : ]

I also made a change so the command found in path can be just `semver` which is nicer than `semver.sh`. The change required better detection of the source file. With the command installed globally as well one could do `source $(which semver)`. `semver` could also be installed into a local project into `./deps/semver_bash/semver.sh` if the `-g` flag is omitted