Compile JADE templates as Javascript if the output filename ends in JS.

Signed-off-by: Adam <a.j.winkworth@gmail.com>