gdtool: better command line, stdin lists, cleanup

Also, imgread const filenames and such