Get CSS file extension from the template option if given.

This allows the template file to have the correct extension if
it's not CSS.

Fix #173
I think the `template` extension should be taken from the `stylesheet` option if set. What do you think?