fixes #281

- fixed some filename issues
- fixed bug when importing same image with same name twice