tour: check if file content is set before storing in localStorage
tour: check if file content is set before storing in localStorage

file() returns undefined when there is no file to display, like on
https://tour.golang.org/welcome/2

Change-Id: Ia26719537949c9909947068d790f07e2eee8f9ff
Reviewed-on: https://go-review.googlesource.com/90075
Reviewed-by: Andrew Bonventre <682ad9f487f614f19e8b7cc5d340bdc8e1c1b128@golang.org>

Go-zh/tour,Go-zh/tour,Go-zh/tour,Go-zh/tour