Move test script to separate .sh file

to allow recognition for global environment variables