adding Alans changes to fix osx race condition for tmux copy/paste