Make pathFromFileURL a class method, so it can be overridden by
sub-classes.

Back-ported from 7.9