make root_path options configurable

this solves #2837 in a more flexible way than #3446