Update octocd.py

Global file opening procedure improved. Reading data requires further streamlining.