Check if ri is installed and provide a better error if not. Fixes #243