Fixed javascript filetype detection.