Fixed bug.
First try on improving paths support for galleries plugin.