Free asprintf result pointer after use and silence "implicit declaration of asprintf"

Made these two changes to clean up some weirdness as I read/built.