improve pprint slightly and add a pprint test

a trailing space was being printed after printing prefixed libspecs