Fix #585 - Segfault in echo q | r2 -d lib