Modify converttoimage.py to accept a file path, and make arg parsing more robust.