Fix add_to_list() for bash

while still being POSIX compliant