Evaluate final bit of transform string first, to determine output format

Fixes #46