Fix bug in Path.expand