If the project path contained a non-ASCII character, Python 2 crashed. Backport of c9ece2e6 from master