Bug fixes and addition of XKCD preset

Fixed some bugs that became apparent when creating the XKCD preset
(esp. over-zealous and wrong validation). Added utility functions for
dealing with presets, and added the XKCD preset. Also documented the
new functions and presets in general.