Fix for plot_data.py script.

Use script directory instead of current directory.
Fix plot for system state flags.