Use interfaces as typehints where applicable.
Fix incorrect filesystem interface.
Merge pull request #6318 from franzliedke/contracts

[5.0] Use Contracts As Typehints
Make the previous URL available in the session for Redirect::back.