web3.eth.compile.solidity ask for a string as a parameter. Not only, it must be a string without line breaks: in the official greeter tutorial to use an online-tool to remove line breaks from contract is encouraged.
I find that very embarrassing, and I feel that the typical signature for such a method should get a path to a .sol file instead of a string. So... maybe web3 not compiling from a file is some sort of security measure? Or there is any powerful reason to web3 not compiling from a source file I'm unaware?