utils/sandbox: Misc PEP-8 cleanups
- remove unused imports
- Use the "with open" syntax
- rewrite some strings to limit all lines to a maximum of 79 characters.
- Do not use the equality operator to compare False and None
This will create a new commit in order to revert the existing changes.