added a configure option to allow replacing ~ by domain/username instead of username in custom config file path