imgpt2 - handle spaces in ID names and one-line files