Fixed #115. Support DATABASES and DEBUG settings from environment.

See #115.