1) Updated README with directive example code, 2) wrapped attribute section with undefined check

Not sure if it's more pure to leave 2) off, but I needed it and thought others may as well.