UD#version added.
Using trollop to parse the options.
-n support added (fixes #2).
--ratio support added (fixes #3).