Requiring 'pathname' before monkey-patching it.