make gif making script suck much less

add functions and getopts and help message