Refactored test script and added a tarball for bin