change dir before cat

This should work around whan anybody tries to give pathes, not only the
name.