Code cleanup.
Create missing subdirs when rendering. Closes #61.