command.py: Add way to see if a file is opened