Require pathname when needed, should fix gollum/gollum#728.