Improve text file detection

..and subsequent setting of filetype=rst