Explicitly sort the files in mktargets.py

This avoids spurious changes to the targets.mk files when mktargets
is rerun on different platforms and different file systems.

In particular, OS X seems to mostly return files sorted
alphabetically, case insensitively, while they are returned in
a file system specific order on linux.