Refactor tests
Make the mode of the created job file configurable

Closes Issue #11