Fixed bug where templates without post-replace script would crash CLI