Update path.class.js

ok thanks god you didn't pull it :) it was wrong. And thanks @kienz that made me notice the bug i was introducing.