Update mux.py

- shuffle Valve[Array] and get functions from file
- look up for last open Valve
- wrote header information for new file
- add Record-Number and Unix-Timstamp