Tidy up ar_open by using asprintf to replace xmalloc and sprintf.