Always resolve full path when generate resources. 

Fix #387.