Fixed --index parameter

The previous check depended on the parameter being truthy, which isn't the case if the index is 0. So "--index 0" did not work and selected the biggest file instead.