The role of osmotic effects in fluid flow through shales