[scripts] remote-gdb: fix parsing of arch and libc from given path as well