Allow quoting paths in has_prefix

This is because on Windows, paths can have spaces. We only use the very basic
non-POSIX quoting because we don't need fancy escaping (we only need to deal
with spaces in paths on Windows, and Windows does not allow quote characters
in paths), and because we don't want to deal with the backslash path separator
breaking things on Windows.