check if SPKGDIR is writable when using -w

Signed-off-by: Chess Griffin <chess.griffin@gmail.com>