Add template support to the folder context menus and fix #39.