pathname regex parsing cleverness.  much joy.