[FIX] is_writable would return false while it was writable

For some reason the previous method of checking whether the directory is writable failed.
I rewrote it including the BASE_PATH constant and it works fine now.