write buffer to tempfile before linting

this solves the problem where i had to save a file to get the linting to
work.