method for API 9 is not used more
better detection of writeable directory location