Throw exception if --config-dir doesn't exist

Currently an invalid --config-dir option is silently ignored.
This means that a user could accidentally enter the wrong
directory or have a typo which would cause the desired
config files to not be used and no indication of the error would be
produced.

This change adds a ConfigDirNotFoundError exception that can be
raised when the requested --config-dir isn't found.

While working out the unit tests for this it was discovered that
the test_config_dir_tilde test case was not correct.  It could still
pass when it should fail.  This commit includes a fix for that issue
as well.

Closes-bug: 1255354
Change-Id: I386b2419d04572b14ccf11b527f871a237304e53
Merge "Throw exception if --config-dir doesn't exist"