Use magic environment instead of magic file for the banner.

See commits for comments.