fixes in savetxt and sort.