Avoid indexing into potentially empty vector

Calling `ExodusII_IO::get_elem_var_names` or get_nodal_var_names` can potentially lead to attempting an index loop into an empty vector, this was causing problems for MOOSE in debug mode.

I am not sure if this is the correct fix, but it works.