Fix issue with out-of-order CSS

Move the CSS compilation process to build.py. We need to
look at the order of CSS in index.html in order to compile
it in the right order.