Fix broken tutorial code

Python gave an error when copy/pasting this code, and adding os fixed it for me.