fixed links being treated as dirs