Starts buffer with contents of current app

Running on OS X now grabs all the text in the current apps scope
and seeds the tmp file with this text.

The original content of the buffer is preserved, or rather it's reset
back after the script grabs the text.

Because of some weird line-ending stuff we run a regex when starting
vim. This isn't particularly nice and tends to complain if the buffer
is empty or doesn't contain some 'bad' linesbreaks.