Expand '~' in user config path if needed.

It allows user to set path as "path: ~/mypath" in the config file.

Also includes the failing path in the exception message.