works on os x provided you don't create a cyclicle path