Modified Path constructor to return new Path if not invoked with new.
Added jasmine spec tests.