Don't write metadata on startup. Stupid bug ...
(cherry picked from commit ae42a08c314f2118b74c870178f597f98c98da13)
add strlcpy() implementation for UTF8 strings

and use it where applicable
(cherry picked from commit 79ef80d714c7390514651515db5ed5a06f0d3abf)

Conflicts:
	src/libs/export.c
Add helper function to get a filesize
(cherry picked from commit 07db83fd086363c778b921d15118b97bf81da646)
Don't try to import empty file

See bug #9578.
(cherry picked from commit a1fe583a1f43473b07befb7c56fd38b92df6b34e)
Bug #9578: Don't import dot folders

Dot files are still imported though ...
(cherry picked from commit 26276765d30664b4872df7a6d4c7efd97eb0db3e)
Fix #9578: This time also for dot files
(cherry picked from commit 48d74985fa2e2954ea640012701d37799106e406)