added sys.appdir and sys.cfgdir