Few fixes to make the code work in different environment with Python 2.6

- Use django's SortedDict instead of collections.OrderedDict.
- In settings, make TEMPLATE_DIRS absolute paths.