Fix PSR0Resrouce to be compliant with the PSR0 standard

Closes #410

Cherry-picked @xel1045's changes and added some extra feature coverages