Save scroll position on beforeunload so that it works with manual reloads too. Also clear the session storage of the scroll offsets on reload.
Fix missing minimatch dependency