Tasks.kt: improved check for "is this a kotlin source file?"