fix refresh contents
fix handling resource directories
optime Makefile RELEASE_RESOURCE