Fix pgalias bug where files have the same root but different extensions.

This should work with 2.7 as well.