"kpm pack" generates bash scripts for entry points

- Improve functional test utilities
- Add functional tests for script generation
- Mark bash scripts as executable when "kpm pack" on *nix