Selection is passed as file to remote script to avoid command line becoming too long