Introduces 'Patcher' and 'OsPatcher'.

These classes can monkey-patch access to the filesystem in order to make other
components testable.