p.dirname won't work on an array