check writability to directories used (fix #15)