Noticed a few redundant ternary exps I left behind.
Fixes warnings due to unimplemented RegExp#exec
Fixes Array#sort (per #1)

- Had appeared to work before because of the faulty length assertion and
  the way that console.log iterates over the hashmap.
- Properly sets the length and indices for sorted array.
- Still needs additional tests for user-supplied comparison functions
  and larger arrays.