Fix issues with file page link

TIL about setup/teardown in qunit

Change-Id: Ib283285bea401be251ec3f46a2dbd01623fe895e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/452
(cherry picked from commit 68bb702eaa435db3346528424da601c422acf3c2)