Add transform option

This can be used to transform file to xunit results or json for that matter. It's based on the add-phantomjs-cli branch.