determine script directory and use it to build config path