control-port-filter: fix, clean up temporary directory