replaces Pathname#(dirname|realpath) with File.$1
replaces Pathname#(dirname|realpath) with File.$1

Simpler, thanks to @rubys for the hint.

rbhitchcock/rails,tijwelch/rails,mechanicles/rails,sealocal/rails,matrinox/rails,illacceptanything/illacceptanything,joonyou/rails,vassilevsky/rails,utilum/rails,MSP-Greg/rails,kenta-s/rails,kmayer/rails,rbhitchcock/rails,riseshia/railsguides.kr,rails/rails,amoody2108/TechForJustice,tgxworld/rails,pschambacher/rails,pvalena/rails,Vasfed/rails,kddeisz/rails,mohitnatoo/rails,shioyama/rails,Envek/rails,Spin42/rails,illacceptanything/illacceptanything,tijwelch/rails,amoody2108/TechForJustice,gcourtemanche/rails,hanystudy/rails,voray/rails,yhirano55/rails,yasslab/railsguides.jp,alecspopa/rails,lcreid/rails,eileencodes/rails,notapatch/rails,alecspopa/rails,Stellenticket/rails,Edouard-chin/rails,mtsmfm/rails,Sen-Zhang/rails,kaspth/rails,BlakeWilliams/rails,travisofthenorth/rails,bradleypriest/rails,georgeclaghorn/rails,betesh/rails,assain/rails,bogdanvlviv/rails,rossta/rails,mijoharas/rails,illacceptanything/illacceptanything,shioyama/rails,kamipo/rails,kaspth/rails,illacceptanything/illacceptanything,MichaelSp/rails,mechanicles/rails,samphilipd/rails,kddeisz/rails,travisofthenorth/rails,illacceptanything/illacceptanything,bogdanvlviv/rails,mtsmfm/railstest,pvalena/rails,mathieujobin/reduced-rails-for-travis,felipecvo/rails,88rabbit/newRails,Stellenticket/rails,printercu/rails,elfassy/rails,Edouard-chin/rails,travisofthenorth/rails,stefanmb/rails,fabianoleittes/rails,starknx/rails,bolek/rails,vipulnsward/rails,arunagw/rails,untidy-hair/rails,mtsmfm/railstest,mathieujobin/reduced-rails-for-travis,rails/rails,illacceptanything/illacceptanything,iainbeeston/rails,esparta/rails,maicher/rails,joonyou/rails,repinel/rails,illacceptanything/illacceptanything,kmcphillips/rails,bolek/rails,illacceptanything/illacceptanything,arjes/rails,arjes/rails,ngpestelos/rails,arunagw/rails,ledestin/rails,marklocklear/rails,yalab/rails,schuetzm/rails,deraru/rails,joonyou/rails,jeremy/rails,vassilevsky/rails,schuetzm/rails,odedniv/rails,rafaelfranca/omg-rails,lcreid/rails,prathamesh-sonpatki/rails,kmcphillips/rails,yahonda/rails,yasslab/railsguides.jp,printercu/rails,flanger001/rails,betesh/rails,lcreid/rails,rossta/rails,Envek/rails,88rabbit/newRails,MSP-Greg/rails,prathamesh-sonpatki/rails,joonyou/rails,gcourtemanche/rails,ledestin/rails,illacceptanything/illacceptanything,BlakeWilliams/rails,illacceptanything/illacceptanything,vassilevsky/rails,jeremy/rails,gavingmiller/rails,gfvcastro/rails,eileencodes/rails,sergey-alekseev/rails,deraru/rails,vipulnsward/rails,kddeisz/rails,brchristian/rails,koic/rails,riseshia/railsguides.kr,matrinox/rails,untidy-hair/rails,illacceptanything/illacceptanything,prathamesh-sonpatki/rails,kirs/rails-1,yhirano55/rails,arjes/rails,betesh/rails,eileencodes/rails,Spin42/rails,jeremy/rails,illacceptanything/illacceptanything,repinel/rails,Erol/rails,travisofthenorth/rails,yahonda/rails,rafaelfranca/omg-rails,iainbeeston/rails,notapatch/rails,gfvcastro/rails,aditya-kapoor/rails,EmmaB/rails-1,bogdanvlviv/rails,mohitnatoo/rails,sergey-alekseev/rails,ledestin/rails,Sen-Zhang/rails,MichaelSp/rails,untidy-hair/rails,samphilipd/rails,ngpestelos/rails,Stellenticket/rails,Edouard-chin/rails,baerjam/rails,deraru/rails,bradleypriest/rails,Vasfed/rails,kmayer/rails,esparta/rails,aditya-kapoor/rails,gcourtemanche/rails,gauravtiwari/rails,pvalena/rails,jeremy/rails,marklocklear/rails,brchristian/rails,yalab/rails,assain/rails,schuetzm/rails,xlymian/rails,mtsmfm/rails,kirs/rails-1,mtsmfm/railstest,arunagw/rails,kirs/rails-1,tjschuck/rails,koic/rails,palkan/rails,xlymian/rails,Sen-Zhang/rails,yahonda/rails,richseviora/rails,hanystudy/rails,tgxworld/rails,vipulnsward/rails,Envek/rails,ttanimichi/rails,riseshia/railsguides.kr,88rabbit/newRails,sergey-alekseev/rails,yawboakye/rails,tgxworld/rails,tjschuck/rails,sealocal/rails,yalab/rails,shioyama/rails,arunagw/rails,samphilipd/rails,iainbeeston/rails,kmcphillips/rails,gavingmiller/rails,flanger001/rails,Edouard-chin/rails,kaspth/rails,kmayer/rails,kachick/rails,yawboakye/rails,gauravtiwari/rails,illacceptanything/illacceptanything,sealocal/rails,schuetzm/rails,tgxworld/rails,starknx/rails,fabianoleittes/rails,gfvcastro/rails,deraru/rails,EmmaB/rails-1,elfassy/rails,eileencodes/rails,voray/rails,yalab/rails,vipulnsward/rails,bolek/rails,rbhitchcock/rails,utilum/rails,utilum/rails,palkan/rails,ttanimichi/rails,kamipo/rails,Vasfed/rails,kenta-s/rails,fabianoleittes/rails,richseviora/rails,coreyward/rails,riseshia/railsguides.kr,MichaelSp/rails,iainbeeston/rails,assain/rails,matrinox/rails,mijoharas/rails,printercu/rails,Spin42/rails,lucasmazza/rails,BlakeWilliams/rails,lucasmazza/rails,pschambacher/rails,utilum/rails,prathamesh-sonpatki/rails,Vasfed/rails,Erol/rails,felipecvo/rails,kddeisz/rails,pschambacher/rails,notapatch/rails,marklocklear/rails,mohitnatoo/rails,bogdanvlviv/rails,flanger001/rails,baerjam/rails,amoody2108/TechForJustice,mathieujobin/reduced-rails-for-travis,Stellenticket/rails,pvalena/rails,printercu/rails,bradleypriest/rails,koic/rails,esparta/rails,notapatch/rails,aditya-kapoor/rails,starknx/rails,alecspopa/rails,yawboakye/rails,voray/rails,ngpestelos/rails,hanystudy/rails,tjschuck/rails,stefanmb/rails,mohitnatoo/rails,coreyward/rails,odedniv/rails,palkan/rails,rails/rails,assain/rails,yasslab/railsguides.jp,stefanmb/rails,georgeclaghorn/rails,aditya-kapoor/rails,yahonda/rails,rails/rails,MSP-Greg/rails,georgeclaghorn/rails,yasslab/railsguides.jp,Erol/rails,richseviora/rails,tjschuck/rails,Erol/rails,repinel/rails,illacceptanything/illacceptanything,Envek/rails,gavingmiller/rails,mechanicles/rails,rossta/rails,yhirano55/rails,palkan/rails,esparta/rails,kenta-s/rails,shioyama/rails,baerjam/rails,flanger001/rails,mijoharas/rails,kachick/rails,BlakeWilliams/rails,gauravtiwari/rails,maicher/rails,lcreid/rails,gfvcastro/rails,EmmaB/rails-1,lucasmazza/rails,MSP-Greg/rails,yhirano55/rails,kmcphillips/rails,ttanimichi/rails,mtsmfm/rails,xlymian/rails,fabianoleittes/rails,mechanicles/rails,tijwelch/rails,illacceptanything/illacceptanything,felipecvo/rails,odedniv/rails,kachick/rails,baerjam/rails,kamipo/rails,elfassy/rails,untidy-hair/rails,rafaelfranca/omg-rails,betesh/rails,brchristian/rails,coreyward/rails,maicher/rails,repinel/rails,yawboakye/rails,georgeclaghorn/rails