Added check for directory permissions for npm and node