Adding reversal and capitalizing a string using custom directives