Added httpStatus codes + refactoring

+ Default checksumAlgo is now sha256
  instead of md5.
+ Using centralized httpStatusCodes.
+ Refactored branch conditionals.
+ Handling logic for reading different
types of paths e.g dirs, non-existant etc.