Introduce buildPath() in Storage\Local to reduce the difference to MappedLocal

First step towards #12460 

@MorrisJobke @LukasReschke @DeepDiver1975 
Please add PHPDoc comment that tells what this function does