Set the content of an element

Hi, there he is again :smile:. 
Setting a value for an element was broken. I fixed it and improved the testing situation by separating out most cases that were mentioned in the README and doing actual testing on them (by changing a file in /tmp and then diffing to the expected results).
Could you take a look?