offline mode for firewalled envs (part 2)
In https://github.com/huggingface/transformers/pull/10407 I noticed I missed a few places where `local_files_only` should be overridden for the offline mode, so this PR completes the process.

Also rewrote the test to be more readable. Could test TF/Flax too but I don't have tiny models to run quick tests on.

@LysandreJik, @sgugger 