Run build command for only Javascript files

This fixes the bug that became apparent after coolhand79's commit f4c48ed34fb7ac67b3b89073680fc2bcc28c8873.

The problem is that the build command was getting run for all file types on save, but for non-JS files those variants don't exist.