Fix tempfile creation in nx_balance_sessions.sh
Add session balancing support