image/rg: add RG internal format
tests/rg: add some basic tests
build: fix test executable path
image/r: add R internal image format
tests/r: add some tests