Hide popups when escape is pressed
Close popups when clicking outside the popup.
Merge pull request #1 from Josso/master

Close popups by pressing escape or clicking outside the popup-box. Thanks Josso!