Improve tempfile handling

Just some small optimizations:
- move tempfiles into a subdirectory to keep `/tmp` clean
- capture pane directly to tempfile, don't go through tmux buffer

Tests are still passing!