Fix #171 autodetect script by extension, Initial work on 'ts'