Fixed file path attribute and download action

Fixed download action to use the value of data-path attribute (passed as
context.dir) when set. Fall back to the current directory.