Ensure we are using OS specific path separators rather than hoping.
Switch to regexp for status code matching.