ensure resource directory