Modify basepak.sh to handle pk3 names and versioning; fix empty-string tests.