Fixed route bugs.
Separating BASEDIR from SAGE_HOME.

Supports install base.