Merge pull request #1315 from quickfur/makefile_ln_sf

Add -f to ln
cartesianProduct: default order should be lexicographically sorted.
Update unittest and example code to reflect new ordering.