'~' in the filename was extracted to the home directory name in FcConfigFilename() though, this behavior was broken by d1f48f11. this change fixes it back to the correct behavior.
also add a test case for d1f48f11 which caused by this issue and need to avoid a regression.