layouts_dir is now configurable. Closes #899