DC21-332 & DC21-548: Fix filename and path length validations