extracts avatar into it's own helper

Also moves tests to specs
ensures that the avatar helper always returns a string, might be empty
Merge pull request #248 from opf/fix/avatar_helper

Fix/avatar helper