Check that dir_config returns at least one valid directory

See issue #487