Plugins/Peperoni: added mutex locker to sync simultaneous input and output