CORE: add sort-by, update specs for sort.
MISC: set executable permissions on repl script.