Fix process of obtaining pane id

Check output of system() command before using str2nr() to obtain
pane id. Avoids the false-positive case of empty(0).

Closes #13.