Validate filename length in utils.secure_filename

Most filesystems not support filename longer then 255 characters. This code validates and ensures that filename would be less then `length` param.