Update path.class.js

modified fromElement function to return path even without callback