Refactor the file extension logic in traceur plugin to simplify
This doesn't do the typescript part of the build yet. Also there is a bit of hackiness left to resolve in a follow-up change.