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.
Merge pull request #174 from henrahmagix/get-css-file-extension-from-template-option

Get CSS file extension from the template option if given.