cmds: guard against empty file lists

Signed-off-by: David Aguilar <davvid@gmail.com>