Expand plugin dir name so it's not detected as '.'

Fixes #15
Use plugin name from addon-info.json if available

Fixes #12
Condensed the plugin name fallback logic
Merge pull request #39 from google/pluginname

Detect plugin name correctly