use File::Basename if it exists to determine config directory