Move optionsdir setting closer to usage