[#185, #144] Fix optional project root in templates.