Added sorting support into coffeeScript of withSort too

Here's the coffeeScript version with fixed sorting..