Fix #14123 for Windows
Windows raised a different exception when a home directory doesn't exist, so we catch that too.