Support for custom output file extensions

Resolves issue #16. Includes additional transformations as well (beamer, s5 slides, pdf with table of contents, etc.).