Sort BED file. From http://bedtools.readthedocs.org/en/latest/content/tools/sort.html
sort -k 1,1 -k2,2n