better rotation logic, allow 0 for a dimension - fix #10
streaming output to stdout, fixes #9
1.4.0