added detection of static root folder, added environment variable setting in config.py