Woo! I was reading the path array backwards, when I should have been reading the path backwards