New Enhancement 6220

A possible solution for https://github.com/piwik/piwik/issues/6220, bear with me it is my first time writing a code for PIWIK core :D. 
I added a extra function for permission check and push the system check to diagnostic as was requested.