Just use the plugin dir instead of calling os.path.dirname on the vim file.