Backporting #14534 to 2014.1
Quote paths passed to patch. Fixes #14536.
Merge pull request #14687 from garethgreenaway/backport_14534_to_2014_1

Backporting #14534 to 2014.1
`__file__` is not set in an `exec()` context