Fix some Python warnings

These changes fix two DeprecationWarning warnings in Python 2 and some warnings about unclosed files in Python 3. Also included is a quick documentation addition, since it wasn’t obvious how to include the “--player-no-close” option in the config file.