Path resolution cleanup

See security@silverstripe.com
[ref: CWPBUG-158]