#3522 normalizepath to allow current path

The patch for #3522  mainly affects BaseFileHelper.php::normalizePath() in the following ways:
* 55 - Added parentheses so that a . is preserved if it is the first part of the path.
* 52-54 A ```..``` part will not be cancelled if the preceding part that is popped is ```.```  Therefore ```./../a``` becomes ```../a``` and not ```a```.
* 61-63 Drops the preceeding . if there are more parts. ( ```./a``` becomes ```a```)  This is places after the main logic so that ```./a/../``` will still be parsed to ```.```