Fixes for issues #24, #25, #26

This includes fixes for the issues I submitted this week.

There is one commit per issue, so it should be easy to analyze the code and test changes for each of them. Please let me know if something is unclear or needs improving.

If you don't believe that this is enough for a new release I would highly appreciate releasing a snapshot with those changes as they contain fixes for blockers preventing us from using the plugin in Geb and Ratpack.