Avoid error when using sub directories for assets

Added the same fix to Kha's flash backend.
Merge pull request #1 from kirby0016/master

Avoid error with embedded assets