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

First step towards #12460 

@MorrisJobke @LukasReschke @DeepDiver1975