Moves require_directory below session setup, fixes #29