Added bats test for patching the source code + some fixes

Added a Bats test for patching the source code, like mentioned in #233.

This required some minor changes to the code:
1. Defining a full patch through `patch_file` was not possible
2. Pass a full path over cli to a definition file was, other then described in `usage`, not possible. The log file was tried to be created with the full path specified.