Use object id as title if Title is None
Return a pretty id if title is empty

Also added a test for it.
Merge pull request #7 from yangh/master

Fixed the issue #6