Made a better automation script for testing.

Read the test.sh script for usage