Make more changes to file detection mechanism
[FIX] Updated sonatype script so it doesn't crash

Old script that I forgot to update. Checks for those two properties
before trying to access it.