Fixed a bug that caused an Undefined property error

Signed-off-by: Gerben Peters <g.peters@econcepts.nl>
Merge pull request #1032 from gerp/guest-redirection-fix

Fixed a bug that caused an Undefined property error when using Redirect::guest()
Fix FileLoader for published, environment-specific package configurations.
Merge pull request #1038 from cmenke/patch-9

[Bug?] Fix FileLoader for published, environment-specific package configurations.
Cleaning up a little code.